import 'dart:typed_data';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'flutter_ble_plugin_method_channel.dart';

abstract class FlutterBlePluginPlatform extends PlatformInterface {
  /// Constructs a FlutterBlePluginPlatform.
  FlutterBlePluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static FlutterBlePluginPlatform _instance = MethodChannelFlutterBlePlugin();

  /// The default instance of [FlutterBlePluginPlatform] to use.
  ///
  /// Defaults to [MethodChannelFlutterBlePlugin].
  static FlutterBlePluginPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [FlutterBlePluginPlatform] when
  /// they register themselves.
  static set instance(FlutterBlePluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<void> startScan() {
    throw UnimplementedError('startScan() has not been implemented.');
  }

  Future<bool> isScanning() {
    throw UnimplementedError('isScanning() has not been implemented.');
  }

  Future<void> stopScan() {
    throw UnimplementedError('stopScan() has not been implemented.');
  }

  Future<bool> connect(String deviceId) {
    throw UnimplementedError('setOptions() has not been implemented.');
  }

  Future<void> disconnect(String deviceId) {
    throw UnimplementedError('disconnect() has not been implemented.');
  }

  Future<bool> sendData(String deviceId, Uint8List data) {
    throw UnimplementedError('sendData() has not been implemented.');
  }
}
